<?php
require_once APP_PATH . '/page/model.php';
/**
 * 显示page页面
 * @param  string
 * @return [type]
 */
function page_delete_action() {
	checkLogin();
	$hash = isset($_REQUEST['hash']) ? trim($_REQUEST['hash']) : '';

	if (empty($hash)) {
		header("Location: /" . APP_ADMIN_URI . "/page/list");
	} else {
		$hash = filter_data($hash);
		//获取数据
		$ret = page_model_delete_by_hash($hash);
		//输出
		if ($ret) {
			echo 1;
		} else {
			echo 0;
		}
	}

}